package com.xz.springbootvuebackend.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.math.BigDecimal;
import lombok.Data;
import org.hibernate.validator.constraints.Range;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;

/**
 * 
 * @TableName furn
 */
@TableName(value ="furn")
@Data
public class Furn implements Serializable {
    /**
     * id
     */
    @TableId(type = IdType.AUTO)
    private Integer id;

    /**
     * 家居名称
     */
    @NotEmpty(message = "家居名称不能为空")
    private String name;

    /**
     * 厂家名称
     */
    @NotEmpty(message = "厂家名称不能为空")
    private String maker;

    /**
     * 价格
     */
    @NotNull(message = "请输入数字")
    @Range(min = 0, message = "价格不能小于0")
    private BigDecimal price;

    /**
     * 销量
     */
    @NotNull(message = "请输入数字")
    @Range(min = 0, message = "销量不能小于0")
    private Integer sales;

    /**
     * 库存
     */
    @NotNull(message = "请输入数字")
    @Range(min = 0, message = "库存不能小于0")
    private Integer stock;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;
}